.cgjoy--course {
  display: flex;
  flex-wrap: wrap;
  margin: -10px;

  .cgjoy--course-item {
    width: 20%;
    padding: 10px;
    &:nth-child(1n + 6) {
      display: none;
    }

    // @media screen and (max-width: 9900px) {
    //   & {
    //     width: 20%;

    //     &:nth-child(1n + 11) {
    //       display: none;
    //     }
    //   }
    // }
    // @media screen and (max-width: 1280px) {
    //   & {
    //     width: 25%;
    //     &:nth-child(1n + 5) {
    //       display: none;
    //     }
    //   }
    // }
  }
}
.cgjoy--course-item-wrapper {
  position: relative;
  padding: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  .cgjoy--course-item-miao {
    position: absolute;
    top: 24px;
    left: 0;
    width: 86px;
    height: 28px;
  }
  .tags {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    font-size: 12px;
    .tag {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 20px;
      margin-right: 4px;
      padding: 0 4px;
      color: #fff;
      font-size: 12px;
      white-space: nowrap;
      border-radius: 4px;
      &:last-child {
        margin-right: 0;
      }
      &.normal {
        background-color: #254df8;
      }
      &.fq {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        background-color: #e64646;
      }
      &.zhibo {
        background-color: #e83acc;
      }
      &.green {
        background-color: #10b07b;
      }
    }
  }
  .teacher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
    margin-top: 22px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    .left {
      display: flex;
      flex: 1;
      align-items: center;
      margin-right: 5px;
      cursor: pointer;
      &:hover {
        .name {
          color: #2bffd3;
        }
      }
      .avatar {
        width: 26px;
        height: 26px;
        margin-right: 6px;
        border-radius: 50%;
      }
      .name {
        flex: 1;
        width: 0;
        overflow: hidden;
        color: #ffffff;
        font-size: 14px;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
    }
    .num {
      padding: 3px 6px;
      color: #2affee;
      font-size: 12px;
      background: rgba(42, 255, 238, 0.1);
      border-radius: 4px;
    }
  }
}
// .tag {
//   position: absolute;
//   top: 8px;
//   right: 8px;
//   display: inline-flex;
//   align-items: center;
//   justify-content: center;
//   padding: 2px 5px;
//   color: #fff;
//   font-size: 12px;
//   background: linear-gradient(90deg, #b55dfd 0%, #683bab 100%);
//   border-radius: 5px;
//   &.green {
//     color: #000;
//     background: linear-gradient(135deg, #71ffab 0%, #1c9bb6 100%);
//   }
// }

:global {
  .cgjoy--course {
    // // ie11 兼容
    // display: -ms-grid;
    // -ms-grid-columns: ~"(1fr)[5]";
    // // 正常的
    // display: grid;
    // grid-template-columns: repeat(5, 1fr);
    // grid-gap: 20px;

    &-item {
      .cgjoy--course-item-img {
        transition: transform 0.4s;
      }
      &:hover {
        .cgjoy--course-item-img {
          transform: scale(1.1);
        }
      }
      &-ratio {
        position: relative;
        margin-bottom: 13px;
        padding-top: 81.42%;
      }

      &-content {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        border-radius: 10px;
        // border: 1px solid transparent;

        // &:hover {
        //   border-color: #FF9B0E;
        // }
      }

      &-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: all 0.2s;
      }

      &-tag {
        position: absolute;
        top: 6px;
        right: 8px;
        padding: 4px 9px;
        font-size: 12px;
        line-height: 17px;
        border-radius: 2px;

        &_ys {
          color: #000;
          background: linear-gradient(135deg, #71ffab 0%, #1c9bb6 100%);
        }

        &_zb {
          color: #fff;
          background: linear-gradient(90deg, #b55dfd 0%, #683bab 100%);
        }
      }

      &-mx {
        position: absolute;
        bottom: 5px;
        left: 8px;
        padding: 4px 6px;
        color: #fff;
        font-size: 12px;
        line-height: 17px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 3px;
      }

      &-personnum {
        position: absolute;
        right: 6px;
        bottom: 7px;
        height: 20px;
        color: #fff;
        font-size: 12px;
        line-height: 20px;
      }
      &-mask {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 70px;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 100%);
        border-radius: 0 0 4px 4px;
        opacity: 0.8;
      }

      &-video {
        position: absolute;
        top: 0;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);

        &:hover {
          .cgjoy--course-item-icon_play {
            background-image: url('../../../../assets/pc/images/index/play_hover.png');
          }
        }
      }

      &-icon_play {
        width: 62px;
        height: 62px;
        background: url('../../../../assets/pc/images/index/play.png') no-repeat center / 100%;
      }

      &-title {
        margin-top: 12px;
        margin-bottom: 16px;
        overflow: hidden;
        color: #fff;
        font-weight: 500;
        font-size: 16px;
        text-align: center;
        text-overflow: ellipsis;
        // &_icon {
        //   width: 53px;
        //   height: 20px;
        //   margin-right: 8px;
        // }

        &_text {
          width: 100%;
          overflow: hidden;
          font-weight: 400;
          white-space: nowrap;
          text-overflow: ellipsis;
          cursor: pointer;
          &:hover {
            color: #4de7ff;
            cursor: pointer;
          }
        }
      }

      &-price {
        margin-top: 16px;
        color: #ffe400;
        text-align: center;

        &_unit {
          margin-right: 2px;
          font-weight: 400;
          font-size: 12px;
        }

        &_text {
          font-weight: 400;
          font-size: 20px;
          line-height: 28px;
        }
      }
    }
  }

  // @media screen and (max-width: 1280px) {
  //   .cgjoy--course {
  //     grid-template-columns: repeat(4, 1fr);
  //     -ms-grid-columns: ~"(1fr)[4]";

  //     &-item:nth-of-type(5n) {
  //       display: none;
  //     }
  //   }
  // }

  /***** ie11 兼容 ****/

  // grid-gap 用 marign 替换
  // @media all and (-ms-high-contrast: none) {
  //   .cgjoy--course-item {
  //     margin: 10px;
  //   }
  // }

  // @media all and (-ms-high-contrast: none) and (max-width: 1280px) {
  //   .cgjoy--course {
  //     // &-item:nth-of-type(1n + 13) {
  //     //   display: block;
  //     // }

  //     // &-item:nth-of-type(7n) {
  //     //   display: none;
  //     // }
  //   }

  // }
}

// 课程item， 长的那种
.courseItemLong {
  position: relative;
  display: flex;
  width: 471px;
  height: 122px;
  padding: 8px;
  background: #192c53;
  border-radius: 12px;

  &.disabled {
    background-color: #2f5083;

    .title,
    .money {
      color: #7688a5;
    }
  }

  .delete {
    position: absolute;
    right: 12px;
    bottom: 10px;
    width: 24px;
    height: 24px;
    cursor: pointer;
  }

  .imgWrapper {
    position: relative;
    min-width: 131px;
    height: 106px;
    overflow: hidden;
    border-radius: 4px;

    .over {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;

      .mask {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #000;
        opacity: 0.8;
      }

      .overmain {
        position: absolute;
        top: 0;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        color: #fff;
      }
    }

    .img {
      width: 100%;
      height: 100%;
      background-position: center;
      background-size: cover;
      cursor: pointer;
    }

    .tag {
      position: absolute;
      top: 4px;
      left: 4px;
      max-width: 100px;
      padding: 3px 10px;
      overflow: hidden;
      font-size: 12px;
      line-height: 17px;
      white-space: nowrap;
      text-overflow: ellipsis;
      border-radius: 5px;

      &.ys {
        color: #000;
        background: linear-gradient(135deg, #71ffab 0%, #1c9bb6 100%);
      }

      &.zb {
        color: #fff;
        background: linear-gradient(90deg, #b55dfd 0%, #683bab 100%);
      }
    }
  }

  .content {
    margin-left: 10px;
  }

  .title {
    width: 314px;
    margin-top: 4px;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .info {
    margin: 12px 0 24px 0;
    color: #7688a5;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
  }

  .money {
    display: flex;
    align-items: center;
    color: #ffe400;

    .unit {
      font-size: 14px;
      line-height: 20px;
    }

    .text {
      margin: 0 12px 0 2px;
      font-size: 18px;
      line-height: 25px;
    }

    .button {
      padding: 2px 6px;
      color: #fff;
      font-size: 12px;
      line-height: 17px;
      background: #254df8;
      border-radius: 4px;
      cursor: pointer;

      &.disabled {
        color: #7688a5;
        background: #293e6b;
        cursor: not-allowed;
      }
    }
  }
}
